package Employee1;

class SalesEmployee extends Employee{
    private double sales ;			//定义销售额sales
    private double rate; 			//定义提成率rate
    public SalesEmployee(){}
    public SalesEmployee(String name,int month,double sales,double rate){
        super(name,month);
        this.sales = sales;
        this.rate = rate;
    }
    public double getSales(){
        return sales;
    }
    public double getRate(){
        return rate;
    }
    public void setSales(double sales){
        this.sales = sales;
    }
    public void setRate(double rate){
        this.rate = rate;
    }
    public double getSalary(int month){
        return this.getSales()*(1+this.getRate())+super.getSalary(month);
    }
}
